﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
using UL360Data;

namespace UL360SurveyWeb
{
    public partial class AlreadyAnswered : System.Web.UI.Page
    {
        protected void Page_Load(object sender, EventArgs e)
        {
            string language = Request.QueryString["langid"];

            //Set language if languageid is not in querystring
            if (Request.QueryString["langid"] == null)
            {
                language = "";
            }

            //Set messages depending on participant's language
            //Default - Swedish
            if (String.IsNullOrEmpty(language) || language == "1")
            {
                CourseEvaluationLabel.Text = "Kursutvärdering";
                AlreadyAnsweredLabel.Text = "Du har redan svarat på enkäten.";
            }
            //English
            else if (language == "2")
            {
                CourseEvaluationLabel.Text = "Course evaluation";
                AlreadyAnsweredLabel.Text = "You already answered the questionnaire.";
            }
            //Norwegian
            else
            {
                CourseEvaluationLabel.Text = "Kursevaluering";
                AlreadyAnsweredLabel.Text = "Du har allerede besvart spørreskjemaet.";
            }
        }
    }
}